<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
	<!-- content starts -->
	<blockquote class="layui-elem-quote"><{$action}></blockquote>

	<fieldset class="layui-elem-field">
  		<legend>按条件搜索</legend>
  		<div class="layui-field-box">
			<form class="layui-form layui-form-pane1" method="post" action="<{$current_url}>">
				<{assign var="pid" value=$conditions['pid']|default:"all"}>
				<div class="layui-form-item">
			    	<div class="layui-inline">
			    		<input type="text" name="search" placeholder="用户名" value="<{if $data['search']}><{$data['search']}><{/if}>" class="layui-input">
			    	</div>
			    	<div class="layui-inline">
			    		<button type="submit" class="layui-btn">搜索</button>
			    		<a class="layui-btn" href="/sys_user/add"><i class="layui-icon"></i> 添加后台用户</a>
			    	</div>
		    	</div>

				
			</form>
  		</div>
	</fieldset>
	
	<form class="layui-form layui-form-pane1" method="post" action="/sys_user/update_sorts" delete_action="/sys_user/delete">
		<table class="layui-table" lay-even lay-skin="row">
		  	<thead>
			  	<tr>
				  	<th>ID</th>
				  	<th>用户名</th>
				  	<th>角色</th>
				  	<th>真实姓名</th>
				  	<th>部门(工号)</th>
				  	<th>手机号码</th>
				  	<th>用户状态</th>
				  	<th>操作</th>
			  	</tr>
		  	</thead>   
		  	<tbody>
		  	<{foreach from=$manage_user_list item=item}>
			  	<tr>
			  		<td class="center"><input type="checkbox" name="ids[]" value="<{$item['id']}>" title="<{$item['id']}>"></td>
			  		<td class="center"><{$item['username']}></td>
			  		<td class="center"><{$item['role_name']}></td>
			  		<td class="center"><{$item['true_name']}></td>
			  		<td class="center"><{$item['department']}>(<{$item['job_no']}>)</td>
			  		<td class="center"><{$item['phone']}></td>
			  		<td class="center">
			  		<{if $item['username'] neq 'admin'}>
			  			<{if $item['status'] == 1}>
						<a user_id="<{$item['id']}>" status="0" class="user_status" href="javascript:;">启用</a>
						<{else}>
						<a user_id="<{$item['id']}>" status="1" class="user_status" href="javascript:;">禁用</a>
						<{/if}>
					<{/if}>
			  		</td>
			  		<td class="center">
						<{if $item['username'] neq 'admin'}>
						<a class="layui-btn layui-btn-primary layui-btn-small" href="/sys_user/edit/<{$item['id']}>" target="_blank"><i class="layui-icon"></i></a>
						<a class="layui-btn layui-btn-primary layui-btn-small delete_data" href="/sys_user/delete/<{$item['id']}>"><i class="layui-icon"></i></a>
						<{/if}>
					</td>
			  	</tr>
		  	<{/foreach}>
		  	<{if $manage_user_list|count eq 0}>
		  		<tr>
			  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
						赞无数据！
					</td>
			  	</tr>
		  	<{/if}>
		  	<tr>
				<td class="center" colspan="8">
					<input type="checkbox" lay-filter="checkbox_all" title="全选">
					<button id="delete" class="layui-btn layui-btn-primary layui-btn-small" style="margin-top:4px;"><i class="layui-icon"></i> 批量删除</button>
				</td>
			</tr>
	  		</tbody>
	  	</table>
  	</form>
  	<div class="layui-box layui-laypage layui-laypage-default">
		<{$pagination}>
	</div>
<{include file="public_html/footer.html"}>